using Baula.TextGen.ActiveTemplating.Tokenizer.Tokens;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Baula.TextGen.ActiveTemplating.Tests.Tokenizer
{
    [TestClass]
    public class TokenTests
    {
        [TestMethod]
        public void DifferentEofInstancesAreEqual()
        {
            Assert.AreEqual(new EofToken(), new EofToken());
        }

        [TestMethod]
        public void LiteralTokensWithSameLiteralAreEqual()
        {
            Assert.AreEqual(new LiteralToken("The literal"), new LiteralToken("The literal"));
        }

        [TestMethod]
        public void LiteralTokensWithDifferentLiteralAreNotEqual()
        {
            Assert.AreNotEqual(new LiteralToken("Some literal"), new LiteralToken("Some other literal"));
        }

        [TestMethod]
        public void InlineExpressionTokensWithSameExpressionAreEqual()
        {
            Assert.AreEqual(new InlineExpressionToken("MyExpression"), new InlineExpressionToken("MyExpression"));
        }

        [TestMethod]
        public void InlineExpressionTokensWithDifferentExpressionAreNotEqual()
        {
            Assert.AreNotEqual(new InlineExpressionToken("Some.Expression"), new InlineExpressionToken("Some.Other.Expression"));
        }

        [TestMethod]
        public void BlockExpressionTokensWithSameExpressionAreEqual()
        {
            Assert.AreEqual(new BlockExpressionToken("MyExpression"), new BlockExpressionToken("MyExpression"));
        }

        [TestMethod]
        public void BlockExpressionTokensWithDifferentExpressionAreNotEqual()
        {
            Assert.AreNotEqual(new BlockExpressionToken("Some.Expression"), new BlockExpressionToken("Some.Other.Expression"));
        }
    }
}